import React, {Component} from 'react'
import {View, Modal, Text} from 'react-native'
import {orange} from '../../utils/colors'
import {EatBeanLoader, TextLoader} from 'react-native-indicator'

export default class TipLayer extends Component {
    componentDidMount(){
    }    
    render() {
        const {
            autoColse = true,
            msg = '默认提示'
        } = this.props
        const {
            modalVisible = true,
            type = 'loadding'
        } = this.props
        return (
            <Modal visible={modalVisible} transparent={true}>
                <View
                    style={{
                    backgroundColor: 'rgba(0,0,0,.01)',
                    flex: 1,
                    justifyContent: 'center',
                    alignItems: 'center'
                }}>
                    {type === 'loadding'
                        ? <View>
                                <EatBeanLoader
                                    size={40}
                                    color={orange}
                                    style={{
                                    justifyContent: 'center',
                                    alignItems: 'center'
                                }}/>
                            </View>
                        : <View
                            style={{
                            padding: 10,
                            backgroundColor: orange,
                            borderRadius: 8
                        }}>
                            <Text style={{}}>{msg}</Text>
                        </View>
}
                </View>
            </Modal>
        )
    }
}
